package org.jeecg.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.domain.BankAccount;
import org.jeecg.service.BankAccountService;
import org.jeecg.mapper.BankAccountMapper;
import org.jeecg.utils.ResponseResult;
import org.springframework.stereotype.Service;

/**
* @author 86182
* @description 针对表【bank_account(银行账户)】的数据库操作Service实现
* @createDate 2024-12-25 13:47:08
*/
@Service
public class BankAccountServiceImpl extends ServiceImpl<BankAccountMapper, BankAccount>
    implements BankAccountService{
    //    根据id 查询银行账号信息
    @Override
    public ResponseResult getBankAccountById(Long id) {
        BankAccount byId = this.getById(id);
        if (byId != null) {
            byId.setKaihuhang(byId.getCity()+" "+byId.getDistrict());
            return ResponseResult.okResult(byId);
        } else {
            return ResponseResult.errorResult(500, "未查询到账户信息");
        }
    }
}




